#ifndef MAINTAIN_H
#define MAINTAIN_H

#include <QWidget>
#include <QTimer>
#include <QDateTime>
#include "InstructionsService.h"
#include "global.h"
#include "custommessagebox.h"
#include <ConfigFileservice.h>

namespace Ui {
class maintain;
}

class maintain : public QWidget
{
    Q_OBJECT


public:
    explicit maintain(QWidget *parent = nullptr);
    ~maintain();

    void sleep(int);

public slots:
    //    void timerUpdate();
    void currentActiveChanged(int index);

private:
    Ui::maintain *ui;

private:
    QString ip;
    QString port;
    InstructionsService *instruct;
    CustomMessageBox *cusMsg;
    ConfigFileService *cfg;
    QList<QString> consumableFromConfig;

    void isEmptyData(QString emptyString);
    void renderWeihuZhiling();
    void renderNotParseWeihuZhiling();
    void showEvent(QShowEvent *event);
    void closeEvent(QCloseEvent *event);

};

#endif // MAINTAIN_H
